<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>临时强扣</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
	<script type="text/javascript">
	
	//查询结算信息
		function queryCheck(){
				$("#queryUserForm").attr("action","<%=basePath%>/tmpDeduc/queryTmpDeducList.ct")
				$("#queryUserForm").submit();
				$("#queryBtnId").attr("disabled","true");
		}
	
	//临时强扣
	$(function(){
		$('#addStrongDeduc').click(function(){
			window.location.href="<%=basePath%>/tmpDeduc/addStrongDeduc.ct";
			$(this).attr("disabled","true");
		});
	})

	</script>
</head>
<body>
<s:form id="queryUserForm" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">临时强扣</div></td>
        </tr>
		<tr class="tb-line">
            
            <td align="right" class="tb-td">
                <div class="tb-h4">商户号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.mchtCd" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
            <td align="right" class="tb-td">
                <div class="tb-h4">商户名：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal">
                <s:textfield name="searchCondition.mchtName" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
        </tr>		
        <tr class="tb-line">
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">银行账号：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-input-normal">
 				 <s:textfield name="searchCondition.accountNo" cssClass="queryWidth"></s:textfield>
 				</label></td>
			<td align="right" class="tb-td">
                <div class="tb-h4">结算日期：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini">
                <s:textfield id="settleDateMin" name="searchCondition.applyDateMin" placeholder="起始日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>-
                <label class="tb-input-mini">
                <s:textfield id="settleDateMax" name="searchCondition.applyDateMax" placeholder="结束日期" onFocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" cssClass="queryWidth"></s:textfield>
                </label>
            </td>
            
        </tr>
         <tr class="tb-line">
 
			<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">机构：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <s:select name="searchCondition.org" list="#{'48502000':'新POSP'}" headerKey="" headerValue="不限" cssClass="queryWidth" id="orgCode"/> 
                </label>
             </td>
             <td align="right" class="tb-td">
                <div class="tb-h4">账户性质：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <s:select name="searchCondition.nature" list="#{'01':'对公','02':'对私'}" headerKey="" headerValue="不限" cssClass="queryWidth" id="orgCode"/> 
                </label>
             </td>            
        </tr>
         <tr class="tb-line">
 
			<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">出款类型：</div>
            </td>
            <td class="tb-td">
 				<label class="tb-select">
				 <s:select name="searchCondition.type" list="#{'0':'普通交易出款','1':'扫码出款','2':'强扣放款'}" headerKey="" headerValue="不限" cssClass="queryWidth" id="orgCode"/> 
                </label>
             </td>          
        </tr>
		<tr>
						<td colspan="4" align="center"><span style="color: red"><s:actionerror /></span>
							<span style="color: red;"><s:actionmessage /></span > <span style="color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
		</tr>
        
        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input id="queryBtnId" type="button" value="查询" onclick="queryCheck()"/>
                </label>
                <label class="tb-input-submit">
                    <input type="reset" id="res" value="取消"/>
                </label>
                <s:if test="#session.session_merchant.roleType==\"06\" || #session.session_merchant.roleType==\"07\"">
                <label class="tb-input-submit">
                    <input id="addStrongDeduc" type="button" value="登记"/>
                </label>
                </s:if>
            </td>
        </tr>
        <s:if test="#request.searchRsList != null && #request.searchRsList.size>0">
			<tr class="tb-line">
				<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/tmpDeduc/queryTmpDeducList.ct?currentPage=" />

				</td>
			</tr>
		</s:if>
    </tbody>
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="16">结算完成信息列表</th>
            </tr>
            <tr class="tb-line bg-gray">
            	
                <th class="tb-th">商户号</th>
                <th class="tb-th">商户名称</th>                
                <th class="tb-th">账号名称</th>
                <th class="tb-th">结算银行</th>
                <th class="tb-th">结算银行账号</th>               
                <th class="tb-th">出款金额（元）</th>
                <th class="tb-th">商户手续费（元）</th>
                <th class="tb-th">冻结金额（元）</th>
                <th class="tb-th">结算金额（元）</th>               
                <th class="tb-th">交易金额（元）</th>
                <th class="tb-th">出款类型</th>
                <th class="tb-th">账户性质</th>
                <th class="tb-th">结算日期</th>
                <th class="tb-th">出款状态</th>            
            </tr>
        </thead>
        <tbody>
			<s:iterator value="#request.settleList" status="stat" id="bean">
				<tr  class="tb-line"  >
					
					<td class="tb-td">
						<s:property value="#bean.mchtCd"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.mchtName"/>
					</td>
					
					<td class="tb-td">
						<s:property value="#bean.accountName"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.bankName"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.account"/>
					</td>				
					<td class="tb-td">
						<s:property value="#bean.unFreezeAmt"/>
					</td>				
					<td class="tb-td">
						<s:property value="#bean.mchtFee"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.freezeAmt"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.mchtSetAmt"/>
					</td>
					<td class="tb-td">
						<s:property value="#bean.transAmt"/>
					</td>
					<td class="tb-td">
						<s:if test="#bean.remark==\"0\" ">
							普通交易出款
						</s:if>
						<s:elseif test="#bean.remark==\"1\"">
							扫码出款
						</s:elseif>
						<s:elseif test="#bean.remark==\"2\"">
							强扣放款
						</s:elseif>
						<s:else>
							未知
						</s:else>
					</td>
					<td class="tb-td">
						<s:if test="#bean.accType==\"01\" ">
							对公
						</s:if>
						<s:elseif test="#bean.accType==\"02\" ">
							对私
						</s:elseif>
						<s:else>
							未知
						</s:else>
					</td>
					<td class="tb-td">
						<s:property value="#bean.settleDate"/>
					</td>
					<td class="tb-td">
						<s:if test="#bean.settleFlag == 1">
						结算完成
						</s:if>
						<s:else>
						待定
						</s:else>
					</td>
				</tr>
			</s:iterator>
        </tbody>
    </table>
</div>
</s:form>
</body>
</html>